mwilli2@pug.(none)
rac61@labyrinth.cl.cam.ac.uk
rgr22@boulderdash.cl.cam.ac.uk
+riel@redhat.com
rminnich@lanl.gov
rn@wyvis.camb.intel-research.net
rn@wyvis.research.intel-research.net
mapped_size += PAGE_SIZE;
}
- return ((unsigned char *) base + offset);
+ return ((char *) base + offset);
}
si->mod_len, si->mod_start);
}
- dst = si->cmd_line;
+ dst = (char *)si->cmd_line;
if ( cmdline != NULL )
{
for ( i = 0; i < 255; i++ )
static int pci_bios_read_config_byte(struct pci_dev *dev, int where, u8 *value)
{
int result;
- u32 data;
+ u32 data = 0;
if (!value)
BUG();
static int pci_bios_read_config_word(struct pci_dev *dev, int where, u16 *value)
{
int result;
- u32 data;
+ u32 data = 0;
if (!value)
BUG();
*/
void __init identify_cpu(struct cpuinfo_x86 *c)
{
- int junk, i, cpu = smp_processor_id();
- u32 xlvl, tfms;
+ int i, cpu = smp_processor_id();
+ u32 xlvl, tfms, junk;
phys_proc_id[cpu] = cpu;
logical_proc_id[cpu] = 0;
panic("Ancient processors not supported\n");
/* Get vendor name */
- cpuid(0x00000000, &c->cpuid_level,
- (int *)&c->x86_vendor_id[0],
- (int *)&c->x86_vendor_id[8],
- (int *)&c->x86_vendor_id[4]);
+ cpuid(0x00000000, (unsigned int *)&c->cpuid_level,
+ (unsigned int *)&c->x86_vendor_id[0],
+ (unsigned int *)&c->x86_vendor_id[8],
+ (unsigned int *)&c->x86_vendor_id[4]);
get_cpu_vendor(c);
void __init __start_xen(multiboot_info_t *mbi)
{
- unsigned char *cmdline;
+ char *cmdline;
module_t *mod = (module_t *)__va(mbi->mods_addr);
void *heap_start;
unsigned long firsthole_start, nr_pages;
set_bit(DF_PRIVILEGED, &dom0->d_flags);
/* Grab the DOM0 command line. Skip past the image name. */
- cmdline = (unsigned char *)(mod[0].string ? __va(mod[0].string) : NULL);
+ cmdline = (char *)(mod[0].string ? __va(mod[0].string) : NULL);
if ( cmdline != NULL )
{
while ( *cmdline == ' ' ) cmdline++;
static void vmx_vmexit_do_cpuid(unsigned long input, struct xen_regs *regs)
{
- int eax, ebx, ecx, edx;
+ unsigned int eax, ebx, ecx, edx;
unsigned long eip;
__vmread(GUEST_EIP, &eip);
case 0xa4:
/* movsb */
thread_inst->op_size = BYTE;
- strcpy(thread_inst->i_name, "movs");
+ strcpy((char *)thread_inst->i_name, "movs");
return DECODE_success;
case 0xa5:
thread_inst->op_size = LONG;
}
- strcpy(thread_inst->i_name, "movs");
+ strcpy((char *)thread_inst->i_name, "movs");
return DECODE_success;
return DECODE_failure;
}
- strcpy(thread_inst->i_name, "mov");
+ strcpy((char *)thread_inst->i_name, "mov");
if (*inst != 0x0f) {
return DECODE_success;
}
}
thread_inst->op_size = BYTE;
- strcpy(thread_inst->i_name, "movzb");
+ strcpy((char *)thread_inst->i_name, "movzb");
return DECODE_success;
case 0xb7:
thread_inst->op_size = WORD;
index = get_index((inst + 1));
thread_inst->operand[1] = mk_operand(LONG, index, 0, REGISTER);
- strcpy(thread_inst->i_name, "movzw");
+ strcpy((char *)thread_inst->i_name, "movzw");
return DECODE_success;
default:
return DECODE_failure;
}
-static int inst_copy_from_guest(char *buf, unsigned long guest_eip, int inst_len)
+static int inst_copy_from_guest(unsigned char *buf, unsigned long guest_eip, int inst_len)
{
unsigned long gpte;
unsigned long mfn;
ma = (mfn << PAGE_SHIFT) | (guest_eip & (PAGE_SIZE - 1));
inst_start = (unsigned char *)map_domain_mem(ma);
- memcpy(buf, inst_start, inst_len);
+ memcpy((char *)buf, inst_start, inst_len);
unmap_domain_mem(inst_start);
} else {
// Todo: In two page frames
store_xen_regs(inst_decoder_regs);
// Only handle "mov" and "movs" instructions!
- if (!strncmp(mmio_inst.i_name, "movz", 4)) {
+ if (!strncmp((char *)mmio_inst.i_name, "movz", 4)) {
if (read_from_mmio(&mmio_inst)) {
// Send the request and waiting for return value.
mpci_p->mmio_target = mmio_inst.operand[1] | WZEROEXTEND;
}
}
- if (!strncmp(mmio_inst.i_name, "movs", 4)) {
+ if (!strncmp((char *)mmio_inst.i_name, "movs", 4)) {
int tmp_dir;
tmp_dir = ((va == inst_decoder_regs->edi) ? IOREQ_WRITE : IOREQ_READ);
return;
}
- if (!strncmp(mmio_inst.i_name, "mov", 3)) {
+ if (!strncmp((char *)mmio_inst.i_name, "mov", 3)) {
long value = 0;
int size, index;
void cmdline_parse(char *cmdline)
{
- unsigned char *opt_end, *opt;
+ char *opt_end, *opt;
struct kernel_param *param;
if ( cmdline == NULL )
#include <asm/debugger.h>
/* opt_console: comma-separated list of console outputs. */
-static unsigned char opt_console[30] = OPT_CONSOLE_STR;
+static char opt_console[30] = OPT_CONSOLE_STR;
string_param("console", opt_console);
/* opt_conswitch: a character pair controlling console switching. */
void init_console(void)
{
- unsigned char *p;
+ char *p;
/* Where should console output go? */
for ( p = opt_console; p != NULL; p = strchr(p, ',') )
#include <asm/io.h>
/* Config serial port with a string <baud>,DPS,<io-base>,<irq>. */
-static unsigned char opt_com1[30] = OPT_COM1_STR, opt_com2[30] = OPT_COM2_STR;
+static char opt_com1[30] = OPT_COM1_STR, opt_com2[30] = OPT_COM2_STR;
string_param("com1", opt_com1);
string_param("com2", opt_com2);
__serial_putc(uart, handle, c);
}
-void serial_puts(int handle, const unsigned char *s)
+void serial_puts(int handle, const char *s)
{
struct uart *uart = &com[handle & SERHND_IDX];
/*
* Generic CPUID function
*/
-static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
+static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx)
{
__asm__("cpuid"
: "=a" (*eax),
_MEMORY_PADDING(F);
memory_t mod_len; /* 56: Size (bytes) of pre-loaded module. */
_MEMORY_PADDING(G);
- u8 cmd_line[MAX_CMDLINE]; /* 64 */
+ s8 cmd_line[MAX_CMDLINE]; /* 64 */
} PACKED start_info_t; /* 320 bytes */
/* These flags are passed in the 'flags' field of start_info_t. */
void serial_putc(int handle, unsigned char c);
/* Transmit a NULL-terminated string via the specified COM port. */
-void serial_puts(int handle, const unsigned char *s);
+void serial_puts(int handle, const char *s);
/*
* An alternative to registering a character-receive hook. This function